﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 设备管理:设备台账基础输入参数
/// </summary>
public class DeviceledgerBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 设备编码
    /// </summary>
    public virtual string? DeviceLedgerCode { get; set; }
    
    /// <summary>
    /// 设备名称
    /// </summary>
    public virtual string? DeviceLedgerName { get; set; }
    
    /// <summary>
    /// 品牌名称
    /// </summary>
    public virtual string? BrandName { get; set; }
    
    /// <summary>
    /// 所属分类
    /// </summary>
    public virtual long? DeviceTypeId { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    public virtual string? SpecificationModel { get; set; }
    
    /// <summary>
    /// 所属车间
    /// </summary>
    public virtual long? WorkshopId { get; set; }
    
    /// <summary>
    /// 设备状态
    /// </summary>
    public virtual long? DeviceStateId { get; set; }
    
    /// <summary>
    /// 位置
    /// </summary>
    public virtual string? DeviceLedgerPosition { get; set; }
    
    /// <summary>
    /// 产能
    /// </summary>
    public virtual string? Capacity { get; set; }
    
    /// <summary>
    /// 购买日期
    /// </summary>
    public virtual DateTime? PurchasingDate { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? DeviceLedgerNotes { get; set; }
    
}

/// <summary>
/// 设备管理:设备台账分页查询输入参数
/// </summary>
public class PageDeviceledgerInput : BasePageInput
{
    /// <summary>
    /// 设备编码
    /// </summary>
    public string? DeviceLedgerCode { get; set; }
    
    /// <summary>
    /// 设备名称
    /// </summary>
    public string? DeviceLedgerName { get; set; }
    
    /// <summary>
    /// 所属分类
    /// </summary>
    public long? DeviceTypeId { get; set; }
    
    /// <summary>
    /// 设备状态
    /// </summary>
    public long? DeviceStateId { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 设备管理:设备台账增加输入参数
/// </summary>
public class AddDeviceledgerInput
{
    /// <summary>
    /// 设备编码
    /// </summary>
    [MaxLength(32, ErrorMessage = "设备编码字符长度不能超过32")]
    public string? DeviceLedgerCode { get; set; }
    
    /// <summary>
    /// 设备名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "设备名称字符长度不能超过32")]
    public string? DeviceLedgerName { get; set; }
    
    /// <summary>
    /// 品牌名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "品牌名称字符长度不能超过32")]
    public string? BrandName { get; set; }
    
    /// <summary>
    /// 所属分类
    /// </summary>
    public long? DeviceTypeId { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    [MaxLength(32, ErrorMessage = "规格型号字符长度不能超过32")]
    public string? SpecificationModel { get; set; }
    
    /// <summary>
    /// 所属车间
    /// </summary>
    public long? WorkshopId { get; set; }
    
    /// <summary>
    /// 设备状态
    /// </summary>
    public long? DeviceStateId { get; set; }
    
    /// <summary>
    /// 位置
    /// </summary>
    [MaxLength(32, ErrorMessage = "位置字符长度不能超过32")]
    public string? DeviceLedgerPosition { get; set; }
    
    /// <summary>
    /// 产能
    /// </summary>
    [MaxLength(32, ErrorMessage = "产能字符长度不能超过32")]
    public string? Capacity { get; set; }
    
    /// <summary>
    /// 购买日期
    /// </summary>
    public DateTime? PurchasingDate { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? DeviceLedgerNotes { get; set; }
    
}

/// <summary>
/// 设备管理:设备台账删除输入参数
/// </summary>
public class DeleteDeviceledgerInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 设备管理:设备台账更新输入参数
/// </summary>
public class UpdateDeviceledgerInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 设备编码
    /// </summary>    
    [MaxLength(32, ErrorMessage = "设备编码字符长度不能超过32")]
    public string? DeviceLedgerCode { get; set; }
    
    /// <summary>
    /// 设备名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "设备名称字符长度不能超过32")]
    public string? DeviceLedgerName { get; set; }
    
    /// <summary>
    /// 品牌名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "品牌名称字符长度不能超过32")]
    public string? BrandName { get; set; }
    
    /// <summary>
    /// 所属分类
    /// </summary>    
    public long? DeviceTypeId { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "规格型号字符长度不能超过32")]
    public string? SpecificationModel { get; set; }
    
    /// <summary>
    /// 所属车间
    /// </summary>    
    public long? WorkshopId { get; set; }
    
    /// <summary>
    /// 设备状态
    /// </summary>    
    public long? DeviceStateId { get; set; }
    
    /// <summary>
    /// 位置
    /// </summary>    
    [MaxLength(32, ErrorMessage = "位置字符长度不能超过32")]
    public string? DeviceLedgerPosition { get; set; }
    
    /// <summary>
    /// 产能
    /// </summary>    
    [MaxLength(32, ErrorMessage = "产能字符长度不能超过32")]
    public string? Capacity { get; set; }
    
    /// <summary>
    /// 购买日期
    /// </summary>    
    public DateTime? PurchasingDate { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? DeviceLedgerNotes { get; set; }
    
}

/// <summary>
/// 设备管理:设备台账主键查询输入参数
/// </summary>
public class QueryByIdDeviceledgerInput : DeleteDeviceledgerInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataDeviceledgerInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 设备管理:设备台账数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportDeviceledgerInput : BaseImportInput
{
    /// <summary>
    /// 设备编码
    /// </summary>
    [ImporterHeader(Name = "设备编码")]
    [ExporterHeader("设备编码", Format = "", Width = 25, IsBold = true)]
    public string? DeviceLedgerCode { get; set; }
    
    /// <summary>
    /// 设备名称
    /// </summary>
    [ImporterHeader(Name = "设备名称")]
    [ExporterHeader("设备名称", Format = "", Width = 25, IsBold = true)]
    public string? DeviceLedgerName { get; set; }
    
    /// <summary>
    /// 品牌名称
    /// </summary>
    [ImporterHeader(Name = "品牌名称")]
    [ExporterHeader("品牌名称", Format = "", Width = 25, IsBold = true)]
    public string? BrandName { get; set; }
    
    /// <summary>
    /// 所属分类 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? DeviceTypeId { get; set; }
    
    /// <summary>
    /// 所属分类 文本
    /// </summary>
    [ImporterHeader(Name = "所属分类")]
    [ExporterHeader("所属分类", Format = "", Width = 25, IsBold = true)]
    public string DeviceTypeDisplayName { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    [ImporterHeader(Name = "规格型号")]
    [ExporterHeader("规格型号", Format = "", Width = 25, IsBold = true)]
    public string? SpecificationModel { get; set; }
    
    /// <summary>
    /// 所属车间 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? WorkshopId { get; set; }
    
    /// <summary>
    /// 所属车间 文本
    /// </summary>
    [ImporterHeader(Name = "所属车间")]
    [ExporterHeader("所属车间", Format = "", Width = 25, IsBold = true)]
    public string WorkshopFkDisplayName { get; set; }
    
    /// <summary>
    /// 设备状态 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? DeviceStateId { get; set; }
    
    /// <summary>
    /// 设备状态 文本
    /// </summary>
    [ImporterHeader(Name = "设备状态")]
    [ExporterHeader("设备状态", Format = "", Width = 25, IsBold = true)]
    public string DeviceStateFkDisplayName { get; set; }
    
    /// <summary>
    /// 位置
    /// </summary>
    [ImporterHeader(Name = "位置")]
    [ExporterHeader("位置", Format = "", Width = 25, IsBold = true)]
    public string? DeviceLedgerPosition { get; set; }
    
    /// <summary>
    /// 产能
    /// </summary>
    [ImporterHeader(Name = "产能")]
    [ExporterHeader("产能", Format = "", Width = 25, IsBold = true)]
    public string? Capacity { get; set; }
    
    /// <summary>
    /// 购买日期
    /// </summary>
    [ImporterHeader(Name = "购买日期")]
    [ExporterHeader("购买日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? PurchasingDate { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? DeviceLedgerNotes { get; set; }
    
}
